
from collections import namedtuple

import gym
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from typing import TYPE_CHECKING

"等效于"
"from tensorflow import keras"
"from tensorflow import layers"
if TYPE_CHECKING:
    import keras
else:
    from tensorflow import keras
    from keras import layers

from tqdm import tqdm


def generate_action_distribution(action_index: int, action_dim: int):
    action_distribution = np.zeros(action_dim) # .astype(int)
    action_distribution[action_index] = 1
    "这里要升维吗"
    # action_distribution = np.expand_dims(action_distribution, 0)
    return action_distribution


if __name__ == '__main__':

    t = generate_action_distribution(3, 12)
    print(t)
